#include <iostream>
#include <cmath>

class Solution
{
public:
    int findClosest(int x, int y, int z)
    {
        int a = abs(x - z);
        int b = abs(y - z);
        return a == b ? 0 : a < b ? 1
                                  : 2;
    }
};